<style>
    .layui-form .layui-form-item .layui-inline .layui-form-label {
        width: 150px;
    }
    .layui-form .layui-form-item .layui-inline input{
        width: 200px;
    }
</style>
<form class="layui-form seller-form" action="">
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">username：</label>
            <div class="layui-input-inline seller-inline-3">
                <input type="text" name="username" lay-verify="title" autocomplete="off"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">desc：</label>
            <div class="layui-input-inline seller-inline-3">
                <input type="text" name="desc" lay-verify="title" autocomplete="off"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">Create Time：</label>
            <div class="layui-input-inline seller-inline-4">
                <input type="text" name="datetime" id="datetime" placeholder="start_time _ end_time" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <div class="layui-input-block">
                <button class="layui-btn layui-btn-sm" lay-submit lay-filter="*"><i class="iconfont icon-chaxun"></i>Search</button>
            </div>
        </div>
    </div>
</form>
<div class="table-body">
    <table id="balanceTable" lay-filter="balanceTable"></table>
</div>
<script>
    layui.use(['form', 'laydate', 'table',], function () {
        var laydate = layui.laydate,
            form = layui.form,
            table = layui.table; //表格
        //时间插件
        laydate.render({
            elem: '#datetime',
            range: '_',
            format: 'yyyy-MM-dd'
        });
        table.render({
            elem: '#balanceTable',
            height: 'full-99',
            cellMinWidth: '80',
            // totalRow: true,
            method: 'post',
            url: "{:url('log/userCheckLog')}",
            id: 'balanceTable',
            cols: [[
                { type: 'numbers'},
                { field: 'username',  align: 'left', title: 'username',width: 130},
                { field: 'type',  align: 'left', title: 'type',width: 150},
                { field: 'data_param',  align: 'left', title: 'data_param',width: 150},
                { field: 'desc',  align: 'left', title: 'desc',width: 150},
                { align: 'center', title: 'Create Time',width:170,
                    templet: function (d) {
                        return layui.util.toDateString(d.ctime * 1000, "yyyy-MM-dd HH:mm:ss");
                    }
                }
            ]],
            page: true,
            limit: 20,
            limits: [20, 50, 100],
        });
        form.on('submit(*)', function (data) {
            layui.table.reload('balanceTable', {
                where: data.field
                , page: {
                    curr: 1 //重新从第 1 页开始
                }
            });
            return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });
    });
</script>